import http from '@/http/api.js'
// 获取部门数据
export function fakePosition() {
	return new Promise((resolute, reject) => {
		try {
			const detail = {
				position: "研发部",
				positionArr: ['研发部', '产品部']
			}
			resolute(detail);
		} catch (e) {
			//模拟接口请求失败
			reject(e);
		}
	})
}

// 获取公告数据
export function fakeBannerList() {
	
	
	return new Promise((resolute, reject) => {
		try {
			const list = [{
				id: '1',
				img: '/static/images/home/banner1.jpg',
				url: 'https://bladex.vip'
			}, {
				id: '2',
				img: '/static/images/home/banner2.png',
				url: 'https://bladex.vip'
			}, {
				id: '3',
				img: '/static/images/home/banner3.png',
				url: 'https://sns.bladex.vip'
			}];
			resolute(list);
		} catch (e) {
			//模拟接口请求失败
			reject(e);
		}
	})
}

// 获取公告数据
export function fakeNoticeList() {
	return new Promise((resolute, reject) => {
		try {
			const list = [{
				id: '1',
				img: '/static/images/home/focus.png',
				title: '天舟五号创造多个航天新纪录'
			}, {
				id: '2',
				img: '/static/images/home/service.png',
				title: '全国累计报告接种新冠疫苗超9亿剂次'
			}];
			resolute(list);
		} catch (e) {
			//模拟接口请求失败
			reject(e);
		}
	})
}

// 获取顶部按钮数据
export function fakeNavButton() {
	return new Promise((resolute, reject) => {
		try {
			const list = [{
					name: '财税服务',
					img: 'https://www.xrskfw.com/static/images/home/n1.png',
					url: '/pages/service/detail?code=1'
				},
				{
					name: '法律服务',
					img: 'https://www.xrskfw.com/static/images/home/n2.png',
					url: '/pages/service/detail?code=2'
				},
				{
					name: '知识产权',
					img: 'https://www.xrskfw.com/static/images/home/n3.png',
					url: '/pages/service/detail?code=3'
				},
				{
					name: '融资咨询',
					img: 'https://www.xrskfw.com/static/images/home/n4.png',
					url: '/pages/service/detail?code=4'
				},
				{
					name: '资本市场',
					img: 'https://www.xrskfw.com/static/images/home/n5.png',
					url:  '/pages/service/detail?code=5'
				},
				{
					name: '综合服务',
					img: 'https://www.xrskfw.com/static/images/home/n6.png',
					url:  '/pages/service/detail?code=6'
				},
				{
					name: '数据资产化',
					img: 'https://www.xrskfw.com/static/images/home/n7.png',
					url:  '/pages/service/sjzch'
				},
				{
					name: '评级风控',
					img: 'https://www.xrskfw.com/static/images/home/n8.png',
					url:  '/pages/service/pjfk'
				},
			];
			resolute(list);
		} catch (e) {
			//模拟接口请求失败
			reject(e);
		}
	})
}

// 获取顶部数据
export function fakHead1Info() {
	return new Promise((resolute, reject) => {
		try {
			const list = [{
					name: '服务企业数',
					num: 200,
					unit: '家',
					url: ''
				},
				{
					name: '服务对接',
					num: 50,
					unit: '家',
					url: ''
				},
				{
					name: '入驻机构',
					num: 30,
					unit: '家',
					url: ''
				},
				{
					name: '累计投资',
					num: '1',
					unit: '亿',
					url: ''
				},

			];
			resolute(list);
		} catch (e) {
			//模拟接口请求失败
			reject(e);
		}
	})
}





// 获取服务按钮数据
export function fakeServiceButton() {
	return new Promise((resolute, reject) => {
		try {
			const list = [{
					name: '工作流',
					img: '/static/images/home/s1.png',
					url: '/pages/plugin/workflow/pages/workbench/index'
				},
				{
					name: '工商年报',
					img: '/static/images/home/s2.png',
					url: ''
				},
				{
					name: '税务登记',
					img: '/static/images/home/s3.png',
					url: ''
				},
				{
					name: '健康码',
					img: '/static/images/home/s4.png',
					url: ''
				},
				{
					name: '便民服务',
					img: '/static/images/home/s5.png',
					url: ''
				},
				{
					name: '通办大厅',
					img: '/static/images/home/s6.png',
					url: ''
				},
				{
					name: '智能问答',
					img: '/static/images/home/s7.png',
					url: ''
				}
			];
			resolute(list);
		} catch (e) {
			//模拟接口请求失败
			reject(e);
		}
	})
}



// 获取公告数据 
export const getBannerList = (params) =>{
	
	return http.request({
		//#ifndef H5
		url: '/xrsk-server/xrHomeBanner/home/banner/list',
		//#endif
		//#ifdef H5
		url: '/api/xrsk-server/xrHomeBanner/home/banner/list',
		//#endif
		method: 'GET',
		params
	})
	
	 
}


export const dtzxlist = (params) => {
	return http.request({		 
		//#ifndef H5
		url: '/xrsk-server/xrInformations/list',
		//#endif
		//#ifdef H5
		url: '/api/xrsk-server/xrInformations/list',
		//#endif
		header: {
			'Authorization':'Basic d3hhcHA6d3hhcHBfc2VjcmV0'
		},
		method: 'GET',
		params
	})
}
export const dtzxInfo= (params) => {
	return http.request({		 
		//#ifndef H5
		url: '/xrsk-server/xrInformations/detail',
		//#endif
		//#ifdef H5
		url: '/api/xrsk-server/xrInformations/detail',
		//#endif
		method: 'GET',
		params
	})
} 
export const dtzxtypelist = (params) => {
	return http.request({		 
		//#ifndef H5
		url: '/xrsk-server/xrInformations/list',
		//#endif
		//#ifdef H5
		url: '/api/xrsk-server/xrInformations/list',
		//#endif
		header: {		 
			'Authorization':'Basic d3hhcHA6d3hhcHBfc2VjcmV0'
		},
		method: 'GET',
		params
	})
}
//行业案例列表
export const hyallist = (params) => {
	return http.request({		 
		//#ifndef H5
		url: '/xrsk-server/xrCustomerStories/list',
		//#endif
		//#ifdef H5
		url: '/api/xrsk-server/xrCustomerStories/list',
		//#endif
		method: 'GET',
		params
	})
}
 
 //融资类型
 export const rzdict = (params) => {
 	return http.request({		 
 		//#ifndef H5
 		url: '/xrsk-server/home/wxAppDict',
 		//#endif
 		//#ifdef H5
 		url: '/api/xrsk-server/home/wxAppDict',
 		//#endif
 		method: 'GET',
 		params
 	})
 }

 //融资产品列表
 export const rzproductlist = (params) => {
 	return http.request({		 
 		//#ifndef H5
 		url: '/xrsk-server/xrFinancialProducts/list',
 		//#endif
 		//#ifdef H5
 		url: '/api/xrsk-server/xrFinancialProducts/list',
 		//#endif
 		method: 'GET',
 		params
 	})
 }
 //产品详情
 export const rzproductDetail = (params) => {
 	return http.request({		 
 		//#ifndef H5
 		url: '/xrsk-server/xrFinancialProducts/detail',
 		//#endif
 		//#ifdef H5
 		url: '/api/xrsk-server/xrFinancialProducts/detail',
 		//#endif
 		method: 'GET',
 		params
 	})
 }
